<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:body>        
        <div class="change_contai">
            <div class="cn">
                <h3 style="color: #3F8AAC; padding: 0 0 0 105px;">Account Details</h3>
                <p style=" margin-left: 30px;">Fields marked with <i style="color: red;">*</i> are required. <br/>Click 'Save' after you have finished making the changes.</p>
                <table style="margin-left: 30px;">
                    <h:form>

                        <script type="text/javascript">
                            function confirmation() {
                                  var answer = confirm("Do you want Save?")
                                  if (answer){
                                      return true;
                                  }
                                  else{
                                      return false;
                                  }
                            }
                        </script>
                        
                        <tbody>
                            <tr>
                                <td style="text-align: right;">Name<i style="color: red;"> * </i>&nbsp;:</td>
                                <td>
                                    <p:inplace>
                                        <p:inputText value="#{employeeManagedBean.emp.empName}" />
                                    </p:inplace>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">Address<i style="color: red;"> * </i>&nbsp;:</td>
                                <td>
                                    <p:inplace>
                                        <p:inputText value="#{employeeManagedBean.emp.address}" />
                                    </p:inplace>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">Phone<i style="color: red;"> * </i>&nbsp;:</td>
                                <td>
                                    <p:inplace>
                                        <p:inputText value="#{employeeManagedBean.emp.phone}" />
                                    </p:inplace>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">E-mail<i style="color: red;"> * </i>&nbsp;:</td>
                                <td>
                                    <p:inplace>
                                        <p:inputText value="#{employeeManagedBean.emp.email}" />
                                    </p:inplace>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;" ></td>
                                <td>
                                    <h:commandButton value="Save" onclick="return confirmation()" action="#{employeeManagedBean.changeProfileEm}"/>
                                </td>
                            </tr>
                        </tbody>
                    </h:form>
                </table>
            </div>
        </div>
    </h:body>
</html>

